package soap.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import soap.utils.TestUtils;

import java.io.IOException;
import java.util.logging.Logger;

@Slf4j
@Component
public class SystemTask {

    private static String[] keyArray = {"AMD" , "线程撕裂者"};

    @Autowired
    private TestUtils testUtils;

    /**
     * 获取JD图片 每30秒执行一次
     */
//    @Scheduled(cron = "0/30 * * * * ?")
//    public void getJDImage() throws IOException, InterruptedException {
//
//
//        log.info("获取JD图片 每 4min 执行一次");
//
//        for (String key : keyArray) {
//            for (int i = 1; i < 4; i++) {
//                testUtils.getJDImg(key , 1);
//            }
//        }
//
//    }

}